package lab02.test11;

public class Rectangle implements Printx{

    //属性：面积、周长
    double side;
    double area;
    double perimeter;
    //行为：求面积、求周长的方法
    double getArea(){
        return area=side*side;
    }
    double getPerimeter(){
        return perimeter=side*4;
    }
    @Override
    public double printMyWay() {
        return side+area+perimeter;

    }
}
